<template>
	<view class="pageItem">
		<view class="main">
			<view class="card">
				<view class="row" @click="$r('/pages/my/userInfo')" >
					<view class="r_icon iconfont">&#xe6a7;</view>
					<view class="r_txt">{{$t('set.personal_info')}}</view>
					<view class="r_more iconfont">&#xe70f;</view>
				</view>
		<!-- 		<view class="row" @click="$r('/pages/my/feedback')" >
					<view class="r_icon iconfont">&#xe6a6;</view>
					<view class="r_txt">{{$t('set.feedback')}}</view>
					<view class="r_more iconfont">&#xe70f;</view>
				</view> -->
				<view class="row" @click="$r('/pages/news/newsDetail?ori=xy')" >
					<view class="r_icon iconfont">&#xe6a5;</view>
					<view class="r_txt">{{$t('set.user_cc')}}</view>
					<view class="r_more iconfont">&#xe70f;</view>
				</view>
				<view class="row" @click="$r('/pages/news/newsDetail?ori=ys')" >
					<view class="r_icon iconfont">&#xe6a8;</view>
					<view class="r_txt">{{$t('set.privacy_cc')}}</view>
					<view class="r_more iconfont">&#xe70f;</view>
				</view>
				<!-- <view class="row" @click="$r('/pages/my/cancel')">
					<view class="r_icon iconfont">&#xe6a3;</view>
					<view class="r_txt">{{$t('set.cancel_account')}}</view>
					<view class="r_more iconfont">&#xe70f;</view>
				</view> -->
				<view class="row" @click="to_logout">
					<view class="r_icon iconfont">&#xe6bc;</view>
					<view class="r_txt">{{$t('set.sign_out')}}</view>
					<view class="r_more iconfont">&#xe70f;</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { mapMutations } from 'vuex';
	export default {
		data() {
			return {
		           
			};
		},
		methods:{
			...mapMutations(['logout']),
			to_logout() {
				var that = this;
				uni.showModal({
					title: this.$t('system.tip'),
					content: this.$t('system.tip15'),
					success: function(res) {
						if (res.confirm) {
							that.logout();
							that.showMsg(that.$t('system.tip16'));
							setTimeout(function() {
								uni.reLaunch({
									url: '/pages/public/login',
								})
							}, 1500);
						} else if (res.cancel) {
							console.log('用户点击取消');
						}
					}
				});
			},
			
		}
	}
</script>

<style lang="scss">
.main{
	width: 100%;
	padding: 4vw 4% 0;
	.card{
		@include card_style();
		.row:not(:first-of-type){
			margin-top: 8vw;
		}
		.row{
			display: flex;
			align-items: center;
			.r_icon{
				font-size: 5vw;
				color: $main_color_s2;
			}
			.r_txt{
				flex: 1;
				font-size: 4vw;
				padding: 0 4vw;
				font-weight: bold;
				color:$main_color5;
			}
			.r_more{
				font-size: 3.5vw;
				color: $main_color4;
			}
		}
	}
}
</style>
